package ca.usask.cs.drawTree;

import java.util.LinkedList;

import ca.usask.cs.decisiontree.api.EventEdgeInterface;
import ca.usask.cs.decisiontree.api.Edge;

public class ChanceNode  extends TheNode{
	private DrawControler parent;
	
	 private Edge sourceEdge;
	 private double time;
	 private String variableName;
	 private boolean selected;
	 private LinkedList<EventEdgeInterface> childrenEdgeList;
	 private int treeNodeID;
	 private double rollBackValue;
	 private String NodeType = "ChanceNode";
	 
	int nodeCircleColor = 0xff6699FF;
	
	ChanceNode(DrawControler dp, float ix, float iy, float ir, int Nodetype) {
		super(dp, ix, iy, ir, Nodetype);
		parent = dp;
		// TODO Auto-generated constructor stub
	}
	public void draw(float x, float y, float w) {
		parent.fill(nodeCircleColor);
	//	System.out.println(nodeCircleColor+"");
		parent.ellipse(x, y, w, w);
	}
	public void changeColor(int color ) {
		nodeCircleColor = color;
	}
	public void colorBack(){
		nodeCircleColor = 0xff6699FF;
	}
	
	
	public void setSourceEdge(Edge isourceEdge){
		this.sourceEdge = isourceEdge;
	}
	public void setTime(double itime){
		this.time = itime;
	}
	public void setVariableName(String iname){
		this.variableName = iname;
	}
	public void setSelected(boolean iseleted){
		this.selected = iseleted;
	}
	public void setTreeNodeID(int iID){
		this.treeNodeID = iID;
	}
	public void setRollBackValue(double irollBackValue){
		this.rollBackValue = irollBackValue;
	}
//	public void setBestChildEdge(Edge ibestChildEdge){
//		this.bestChildEdge = ibestChildEdge;
//	}

	
	public Edge getSourceEdge(){
		return this.sourceEdge;
	}
	public double getTime(){
		return this.time;
	}
	public String getVariableName(){
		return this.variableName;
	}
	public boolean getSelected(){
		return this.selected;
	}
	public int getTreeNodeID(){
		return this.treeNodeID;
	}
	public double getRollBackValue(){
		return this.rollBackValue;
	}

	public String getNodeType(){
		return this.NodeType;
	}
}
